package models

import "gorm.io/gorm"

type UserAddress struct {
	ID            uint   `gorm:"primaryKey" json:"id"`
	UserId        string `gorm:"column:user_id" json:"mobile"`
	ReceiverName  string `gorm:"column:receiver_name" json:"receiver_name"`
	ReceiverPhone uint   `gorm:"column:receiver_phone" json:"receiver_phone"`
	Province      string `gorm:"column:province" json:"province"`
	City          uint   `gorm:"column:city" json:"city"`
	District      string `gorm:"column:district" json:"district"`
	DetailAddress uint   `gorm:"column:detail_address" json:"detail_address"`
	PostalCode    uint   `gorm:"column:postal_code" json:"postal_code"`
	IsDefault     uint   `gorm:"column:is_default" json:"is_default"`

	CreatedAt JsonTime       `gorm:"column:created_at" json:"created_at"` // 时间格式处理
	UpdatedAt JsonTime       `gorm:"type:timestamp;comment:更新时间" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"type:timestamp;index;comment:删除时间" json:"-"`
}
